home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / plain / contrib / bridge / bid.tex < prev    next >
Encoding:
Text File  |  1994-03-18  |  1.4 KB  |  59 lines

  1. %%%%%%%bid.tex%%%%%%%    %Modified central figure
  2. \def\hand#1#2#3#4{%
  3. %Example: \hand{AKJ765}{AK9}{--}{T983}
  4. \vtop{\hbox{\strut\s\enspace#1}
  5. \hbox{\strut\h\enspace#2}
  6. \hbox{\strut\d\enspace#3}
  7. \hbox{\strut\c\enspace#4}}%end \vtop
  8. }%end \hand
  9. %
  10. \def\crdima#1#2#3#4#5#6{%
  11. %purpose: layout bridge hand
  12. %#1 left upper text
  13. %#2 right upper text
  14. %#3, #4, #5, #6: N, E, S, W hands
  15. \vbox{\halign{              &##\quad\cr
  16.              #1&          #3&     #2\cr
  17.  $\vcenter{#6}$&$\vcenter{\copy\NESW}$&
  18.                       $\vcenter{#4}$\cr
  19.                &          #5&       \cr
  20.               }%end \halign
  21.       }%end \vbox
  22. }%end \crdima
  23. %
  24. \def\NESWfig{%
  25. \hbox{\vrule
  26. \vbox{\offinterlineskip\tabskip0pt
  27. \hrule\kern.25ex\halign{\hskip.5ex
  28. ##\tabskip.5ex&\hfil##\hfil&
  29. ##\hskip.5ex  \tabskip0pt\cr
  30. \noalign{\vskip.5ex}
  31.   &\hbox to 2ex{\hss\N\hss}&  \cr
  32. \kern.25ex\W&              &\E\kern.25ex
  33. \cr
  34.   &\hbox to 2ex{\hss\S\hss}&  \cr
  35. \noalign{\vskip.5ex}
  36.        }%end \halign
  37. \kern.25ex\hrule}%end \vbox
  38. \vrule}%end \hbox
  39. }% end \NESWfig
  40. \setbox\NESW\hbox{\NESWfig}
  41. %
  42. \def\ebid{\errormessage{%
  43.    bbid command is missing}}
  44. %
  45. \def\bbid{\bgroup%
  46.  \def\ebid{\egroup\egroup\egroup}
  47.  \def\alert{$^A$}
  48.  \def\think{$\ldots$\thinspace}
  49.  % etc.
  50.  \vtop\bgroup
  51.  \halign to\bidwidth\bgroup \tabskip2ex
  52.       plus 1ex minus 1ex&    ##\hfil\cr
  53.     \FIH\hfil& \SEH\hfil&
  54.                  \THH\hfil&\FOH\hfil\cr
  55.     \noalign{\vskip.5ex}
  56. }%end \bbid
  57. %end input bid.tex%
  58. %
  59.